import request from '@/utils/request'

// 查询标准规范起草列表
export function listStandd(query) {
  return request({
    url: '/standard/standd/list',
    method: 'get',
    params: query
  })
}

// 查询标准规范起草详细
export function getStandd(sid) {
  return request({
    url: '/standard/standd/' + sid,
    method: 'get'
  })
}

// 新增标准规范起草
export function addStandd(data) {
  return request({
    url: '/standard/standd',
    method: 'post',
    data: data
  })
}

// 修改标准规范起草
export function updateStandd(data) {
  return request({
    url: '/standard/standd',
    method: 'put',
    data: data
  })
}

// 删除标准规范起草
export function delStandd(sid) {
  return request({
    url: '/standard/standd/' + sid,
    method: 'delete'
  })
}

// 导出标准规范起草
export function exportStandd(query) {
  return request({
    url: '/standard/standd/export',
    method: 'get',
    params: query
  })
}

//====================================== private start ===============================================
// 查询标准规范起草附件
export function getUploadFiles(sid) {
  return request({
    url: '/standard/standd/uploadfiles/' + sid,
    method: 'get'
  })
}

// 附件上传新增
export function addUploadFile(data) {
  return request({
    url: '/standard/standd/attachment/add',
    method: 'post',
    data: data
  })
}

// 附件上传修改
export function updateUploadFile(data) {
  return request({
    url: '/standard/standd/attachment/update',
    method: 'post',
    data: data
  })
}

// 附件上传删除
export function delUploadFile(data) {
  return request({
    url: '/standard/standd/attachment/delete',
    method: 'post',
    data: data
  })
}
//====================================== private end ===============================================